package cn.donting.jme.expansion.builder.mesh;

import cn.donting.jme.expansion.attribute.Attribute;
import cn.donting.jme.ioc.Bean;
import com.formdev.flatlaf.extras.FlatSVGIcon;
import com.jme3.scene.shape.Box;

import javax.swing.*;
import java.util.List;
@Bean
public class BoxAttributeBuilder implements MeshAttributeBuilder<Box>{
    @Override
    public boolean isHandle(Object o) {
        return o instanceof Box;
    }

    @Override
    public Box newInstance() {
        return new Box(0.5f,0.5f,0.5f);
    }

    @Override
    public Icon getIcon(int size) {
        return new FlatSVGIcon("icon/spatial.svg",size,size);
    }

    @Override
    public void attribute(List<Attribute> attributes, Box mesh) {
    }

    @Override
    public String getName() {
        return "立方体";
    }
}
